import React, { PureComponent } from 'react';
import { StyleSheet, View, Text, Image } from 'react-native';
type Props = {
  info: Object,
  onPress: Function,

}
type State = {

}

class HomeListView extends PureComponent<Props, State> {
  constructor(props) {
    super(props);
    this.state = {
    };
  }

  render () {
    let { info } = this.props
    return (
      <View style={styles.container}>
        <Image style={styles.img} source={{ uri: info.imageUrl }} />
        <View>
          <Text style={[styles.mb, styles.Title]}>{info.title}</Text>
          <Text style={[styles.mb, styles.moneylimit]}>{info.subtitle}</Text>
          {
            info.description.map((e, i) => (
              <Text key={i} style={[styles.mb, styles.desc]}>{e.description}</Text>
            ))
          }
          <Text style={[styles.mb, styles.actRow]}>地址：{info.address}</Text>
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flexDirection: 'row'
  },
  mb: {
    marginBottom: 8
  },
  img: {
    width: 90,
    height: 90,
    marginLeft: 10,
    marginRight: 10
  },
  Title: {
    fontSize: 20,
    color: '#000000'
  },
  moneylimit: {

  },
  desc: {

  },
  actRow: {

  }

})
export default HomeListView;